<zzzzzz-ui:message key="msg_success_edit_role" type="success"/>
<zzzzzz-ui:message key="msg_success_delete_roles" type="success"/>
<zzzzzz-ui:message key="msg_info_delete_roles_no_item_selected" type="info"/>
<zzzzzz-ui:message key="msg_error_duplicate_entry_exists" type="error"/>

<form:form method="post" action="${ctx}/control_panel/roles/delete" onsubmit="if(confirm('Are you sure to delete these role(s).')) {return true;} return false;">
	<div style="margin-bottom: 10px;">
		<ul class="horizontal actions-index index">
			<li><a class="style2-button medium-button button" style="" href="${ctx}/control_panel/role/add">New</a></li>
			<li><input type="submit" value="Delete" class="style1-button medium-button button" /></li>
		</ul>
	</div>
	<table class="search-iterator">
		<tbody>
			<tr class="results-header">
				<th><input data-dom-id="select-all" type="checkbox" name="select_all"/></th>
				<th>Id</th>
				<th>Name</th>
				<th>Description</th>
				<th>Actions</th>
			</tr>
			<c:forEach items="${searchContainer.results}" var="role">
				<tr class="results-row">
					<td><input data-dom-id="select-case" type="checkbox" name="select_case" value="${role.roleId}"/></td>
					<td>${role.roleId}</td>
					<td><a href="${ctx}/control_panel/role/${role.roleId}">${role.name}</a></td>
					<td>${role.description}</td>
					<td>
						<div style="position: relative; width: 10px;">
							<a href="#dropdown_link"><span class="arrow arrow-down"></span></a>
							<ul data-dom-id="dropdown-menu" class="vertical dropdown-index index">
								<li><a href="${ctx}/control_panel/role/${role.roleId}">Edit</a></li>
								<li><a href="${ctx}/control_panel/role/delete?id=${role.roleId}" onclick="if(confirm('Are you sure to delete this role.')) {return true;} return false;">Delete</a></li>
								<li><a href="${ctx}/control_panel/role/${role.roleId}/current_members">Assign Members</a></li>
							</ul>
						</div>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</form:form>
<zzzzzz-ui:search-paginator searchContainer="${searchContainer}" />
